<html>
  <head>
    <title>Date Test</title>
    <script type="text/javascript" src="../../protovis.js"></script>
    <style type="text/css">

span {
  float: left;
  clear: left;
}
#fig {
  width: 560px;
  margin: auto;
}

    </style>
  </head>
  <body><div id="fig">
    <script type="text/javascript+protovis">

var w = 500,
    h = 10,
    now = new Date().getTime();

var vis = new pv.Panel()
    .data(pv.range(1, 14, .1).map(function(e) Math.pow(10, e)))
    .fillStyle("#ccc")
    .width(w)
    .height(h)
    .bottom(20)
    .left(30)
    .right(30);

vis.add(pv.Rule)
    .def("x", function(t) pv.Scale.linear(new Date(now), new Date(now + t)).range(0, w))
    .data(function() this.x().ticks())
    .strokeStyle("#fff")
    .left(function(d) this.x()(d))
  .anchor("bottom").add(pv.Label)
    .text(function(d) this.anchorTarget().x().tickFormat(d));

vis.render();

    </script>
  </div></body>
</html>
